<form id="consult_answer_form" action="__SELF__" method="post" class="form-horizontal">
    <input type="hidden" name="consult_id" value="{$consult.id}">
    <div class="form-group">
        <label class="col-xs-2 control-label">咨询内容</label>
        <div class="col-xs-10" style="margin-top: 6px;font-size: 15px;">
            {$consult.content}
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-2 control-label">回复内容</label>
        <div class="col-xs-10">
            <textarea name="answer" rows="5" class="form-control">{$consult.answer}</textarea>
        </div>
    </div>
    <div class="form-group">
        <div class="col-sm-offset-2 col-xs-10">
            <input type="button" id="submit" class="btn btn-primary" value="回复咨询" data-loading="稍候..."> <input class="btn btn-default" type="reset" value="重置">
        </div>
    </div>
</form>
<script>
    $(function(){
        $('#submit').click(function(event){
            event.preventDefault();
            var query=$('#consult_answer_form').serialize();
            var action=$('#consult_answer_form').attr('action');
            $.post(action,query,function(msg){
                if(msg.status){
                    $('.close').click();
                    toast.success(msg.info);
                    setTimeout(function(){
                        location.reload();
                    },1500);
                }else{
                    handleAjax(msg);
                }
            },'json');
        });

    });
</script>